#ifndef UIWIN_BASE_DC_H_
#define UIWIN_BASE_DC_H_

#include "gdiobj.h"

namespace uiwin
{
	

	class DLL_API DC
	{
	public:
		DC(HDC hdc) : hdc_(hdc) {}
		DC(HWND hwnd)
		{
			hdc_ = ::GetDC(hwnd);
		}

		void DrawColor(const RECT& rc, DWORD color);

		void DrawLine(const RECT& rc, int nSize, DWORD dwPenColor, int nStyle = PS_SOLID);
		void DrawRect(const RECT& rc, int nSize, DWORD dwPenColor);
		void DrawRoundRect(const RECT& rc, int nSize, int width, int height, DWORD dwPenColor);

		HGDIOBJ SelectObject(HGDIOBJ obj);
		int BitBlt(int x, int y, int cx, int cy, __in_opt HDC hdcSrc, int x1, int y1, DWORD rop);

		int GetClipBox(LPRECT lprect);

		int FillRect(const RECT *lprc, Brush brush);
		int FillRect(const RECT *lprc, COLORREF color);

	private:
		HDC	hdc_;
	};
}

#endif	// UIWIN_BASE_DC_H_